<?php
    session_start();
    include('class.mysql.php');
    $mydb = new mysql();
    $connection = $mydb->Connect();
    $tipe_kk=$_GET["tipe_kk"];
    //Mengambil data reg_no login
    $nuptk = $_SESSION["SES_USERNAME"];
    /*Mengecek aktif user, jika admin, maka, menu pengaturan admin diaktifkan*/
    if ($nuptk=="admin")
        $additional_menu = '<li class="last"><a href="lihat_pesan.php">Pengaturan Pesan Admin</a></li>';
    if($nuptk!="")
    {
        $sql="SELECT no_reg FROM login where nuptk='$nuptk'";
        //echo "$sql";	
        $query = $mydb->Query($sql);
        $num = $mydb->FetchNum($query);
        //$kabupaten[]="Pilih kota2";
        if($array= mysql_fetch_row($query))
        {
	    $reg_no=$array[0];
        }//end
    }
    else
        $reg_no="X";
    //Mengambil nama KK
    if($nuptk!="")
    {
        $sql="SELECT nama_kk FROM identitas where no_reg='$reg_no'";
        //echo "$sql";	
        $query = $mydb->Query($sql);
        $num = $mydb->FetchNum($query);
        //$kabupaten[]="Pilih kota2";
        if($array= mysql_fetch_row($query))
        {
	    $nama_kk=$array[0];
        }//end
        else if ($nuptk=="admin")
            $nama_kk="Administrator";
        else
        {
		        $sql="SELECT pesan9 FROM admin where username='$nuptk'";
		        //echo "$sql";	
		        $query = $mydb->Query($sql);
		        $num = $mydb->FetchNum($query);
		        //$kabupaten[]="Pilih kota2";
		        if($array= mysql_fetch_row($query))
        	      $nama_kk=$array[0];
        }
        $img_log="images/sign_out.png";
    }
    else
    {
        $nama_kk="Belum login";
        $img_log="images/sign_in.png";
    }
    //Menghitung jumlah KK terdaftar
    $sql="SELECT COUNT(*) FROM login ";
    //echo "$sql";	
    $query = $mydb->Query($sql);
    $num = $mydb->FetchNum($query);
    //$kabupaten[]="Pilih kota2";
    if($array= mysql_fetch_row($query))
    {
	$jumlah_total_kk=$array[0];
    }//end

    $sprop2 = $_GET["prop"];
    $skab = $_GET["kab"];
    $ikab2 = (int)$skab;
    if($ikab2 !=0 )
        $ikab2 = $ikab2 - 675;
    if($ikab2<10)
        $skab = '0'.(string)$ikab2;
    else
        $skab = (string)$ikab2;
    //echo $skab;
    $iprop_sel = (int)$sprop2;
    if ($iprop_sel != 0)
        $iprop_sel = $iprop_sel - 150907;
    if ($iprop_sel<10)
        $sprop2 = '0'.(string)$iprop_sel;
    else
        $sprop2 = (string)$iprop_sel;
    if ($iprop_sel==0 && $ikab2==0)
    {
        $Rekapitulasi = 'Nasional';
    }
    else if($iprop_sel !=0 && $ikab2 == 0)
    {
	$sql="SELECT propinsi, kode FROM propinsi WHERE kode='$sprop2'";
	//echo "$sql";	
	$query = $mydb->Query($sql);
	$num = $mydb->FetchNum($query);
	
	//$kabupaten[]="Pilih kota2";
	if($array= mysql_fetch_row($query))
	{
	    $namapropinsi=$array[0];
        }        
        $Rekapitulasi = 'Propinsi '.$namapropinsi;
    }
    else if($iprop_sel !=0 && $ikab2 != 0)
    {
	$sql="SELECT kabupaten, kode,kode_prop FROM kabupaten WHERE kode_prop='$sprop2' and kode='$skab'";
	//echo "$sql";	
	$query = $mydb->Query($sql);
	$num = $mydb->FetchNum($query);
	
	//$kabupaten[]="Pilih kota2";
	if($array= mysql_fetch_row($query))
	{
	    $namakabupaten=$array[0];
        }
        	$sql="SELECT propinsi, kode FROM propinsi WHERE kode='$sprop2'";
	//echo "$sql";	
	$query = $mydb->Query($sql);
	$num = $mydb->FetchNum($query);
	
	//$kabupaten[]="Pilih kota2";
	if($array= mysql_fetch_row($query))
	{
	    $namapropinsi=$array[0];
        }        
        $Rekapitulasi = ' '.$namakabupaten.' Propinsi '.$namapropinsi;
        
    }
    
    //echo $sprop2;
?>

<script type="text/javascript" >

function showlistkota(str)
{
    var data;
    //window.alert(str);
    if (str.length==0)
      {
      document.getElementById("listkota2").innerHTML="";
      return;
      }
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("listkota2").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET","listkota.php?q="+str,true);
    xmlhttp.send();

    update_retprop(str);
}
function showrekapnasional(str)
{
    var data;
    //window.alert("masuk");
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp6=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp6=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp6.onreadystatechange=function()
      {
      if (xmlhttp6.readyState==4 && xmlhttp6.status==200)
        {
        document.getElementById("rekapnas").innerHTML=xmlhttp6.responseText;
        }
      }
    var data2;
    data2 = "tampil_data.php?prop=<?php echo $sprop2 ?>&kab=<?php echo $skab ?>&tipe_kk=<?php echo $tipe_kk ?>";
    //alert(str);
    xmlhttp6.open("GET",data2,true);
    xmlhttp6.send();

}
function showlistpropinsi(str)
{
    //window.alert(str);
    if (str.length==0)
      {
      document.getElementById("listpropinsi").innerHTML="";
      return;
      }
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp2=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp2.onreadystatechange=function()
      {
      if (xmlhttp2.readyState==4 && xmlhttp2.status==200)
        {
        document.getElementById("listpropinsi").innerHTML=xmlhttp2.responseText;
        }
      }
    xmlhttp2.open("GET","listprop.php?q="+str,true);
    xmlhttp2.send();
    //XX-XX-X-XXX
    //ChangeNoReg_updatelist("XX")
}
function showlistbidang(str)
{
    //window.alert(str);
    if (str.length==0)
      {
      document.getElementById("listbidang").innerHTML="";
      return;
      }
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp3=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp3.onreadystatechange=function()
      {
      if (xmlhttp3.readyState==4 && xmlhttp3.status==200)
        {
        document.getElementById("listbidang").innerHTML=xmlhttp3.responseText;
        }
      }
    xmlhttp3.open("GET","listbidang.php?q="+str,true);
    xmlhttp3.send();
    //ChangeNoReg_updatelist("XX")

}
function setCookie(c_name,value,exdays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate() + exdays);
	var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
	document.cookie=c_name + "=" + c_value;
}
function getCookie(c_name)
{
	var i,x,y,ARRcookies=document.cookie.split(";");
	for (i=0;i<ARRcookies.length;i++)
	  {
	  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
	  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
	  x=x.replace(/^\s+|\s+$/g,"");
	  if (x==c_name)
	    {
	    return unescape(y);
	    }
	  }
}


function saveDB(str)
{
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp5=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp5=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp5.onreadystatechange=function()
      {
      if (xmlhttp5.readyState==4 && xmlhttp5.status==200)
        {
        document.getElementById("testing").innerHTML=xmlhttp5.responseText;
        }
      }
    var no_reg=document.Inputdata.no_registrasi.value;
    var nama_kelompok=document.Inputdata.nama_kelompok.value;
    var spassword_kk=document.Inputdata.password_kk.value;
    var spassword_kk2=document.Inputdata.password_kk2.value;
    var salamat_kk=document.Inputdata.alamat_kk.value;
    var sdesa_kk=document.Inputdata.desa_kk.value;
    var skecamatan_kk=document.Inputdata.kecamatan_kk.value;
    var semail_kk=document.Inputdata.email_kk.value;
    var shp_kk=document.Inputdata.hp_kk.value;
    var snama1=document.Inputdata.nama1.value; var sanggota1=document.Inputdata.anggota1.value; snuptk1=document.Inputdata.nuptk1.value;
    var snama2=document.Inputdata.nama2.value; var sanggota2=document.Inputdata.anggota2.value; snuptk2=document.Inputdata.nuptk2.value;
    var snama3=document.Inputdata.nama3.value; var sanggota3=document.Inputdata.anggota3.value; snuptk3=document.Inputdata.nuptk3.value;
    var snama4=document.Inputdata.nama4.value; var sanggota4=document.Inputdata.anggota4.value; snuptk4=document.Inputdata.nuptk4.value;
    var snama5=document.Inputdata.nama5.value; var sanggota5=document.Inputdata.anggota5.value; snuptk5=document.Inputdata.nuptk5.value;
    var snama6=document.Inputdata.nama6.value; var sanggota6=document.Inputdata.anggota6.value; snuptk6=document.Inputdata.nuptk6.value;
    var snama7=document.Inputdata.nama7.value; var sanggota7=document.Inputdata.anggota7.value; snuptk7=document.Inputdata.nuptk7.value;
    var snama8=document.Inputdata.nama8.value; var sanggota8=document.Inputdata.anggota8.value; snuptk8=document.Inputdata.nuptk8.value;
    var snama9=document.Inputdata.nama9.value; var sanggota9=document.Inputdata.anggota9.value; snuptk9=document.Inputdata.nuptk9.value;
    var snama10=document.Inputdata.nama10.value; var sanggota10=document.Inputdata.anggota10.value; snuptk10=document.Inputdata.nuptk10.value;
    var snama11=document.Inputdata.nama11.value; var sanggota11=document.Inputdata.anggota11.value; snuptk11=document.Inputdata.nuptk11.value;
    var snama12=document.Inputdata.nama12.value; var sanggota12=document.Inputdata.anggota12.value; snuptk12=document.Inputdata.nuptk12.value;
    var snama13=document.Inputdata.nama13.value; var sanggota13=document.Inputdata.anggota13.value; snuptk13=document.Inputdata.nuptk13.value;
    var snama14=document.Inputdata.nama14.value; var sanggota14=document.Inputdata.anggota14.value; snuptk14=document.Inputdata.nuptk14.value;
    var snama15=document.Inputdata.nama15.value; var sanggota15=document.Inputdata.anggota15.value; snuptk15=document.Inputdata.nuptk15.value;
    var snama16=document.Inputdata.nama16.value; var sanggota16=document.Inputdata.anggota16.value; snuptk16=document.Inputdata.nuptk16.value;
    var snama17=document.Inputdata.nama17.value; var sanggota17=document.Inputdata.anggota17.value; snuptk17=document.Inputdata.nuptk17.value;
    var snama18=document.Inputdata.nama18.value; var sanggota18=document.Inputdata.anggota18.value; snuptk18=document.Inputdata.nuptk18.value;
    var snama19=document.Inputdata.nama19.value; var sanggota19=document.Inputdata.anggota19.value; snuptk19=document.Inputdata.nuptk19.value;
    var snama20=document.Inputdata.nama20.value; var sanggota20=document.Inputdata.anggota20.value; snuptk20=document.Inputdata.nuptk20.value;
    var snama21=document.Inputdata.nama21.value; var sanggota21=document.Inputdata.anggota21.value; snuptk21=document.Inputdata.nuptk21.value;
    var snama22=document.Inputdata.nama22.value; var sanggota22=document.Inputdata.anggota22.value; snuptk22=document.Inputdata.nuptk22.value;
    var snama23=document.Inputdata.nama23.value; var sanggota23=document.Inputdata.anggota23.value; snuptk23=document.Inputdata.nuptk23.value;
    var snama24=document.Inputdata.nama24.value; var sanggota24=document.Inputdata.anggota24.value; snuptk24=document.Inputdata.nuptk24.value;
    var snama25=document.Inputdata.nama25.value; var sanggota25=document.Inputdata.anggota25.value; snuptk25=document.Inputdata.nuptk25.value;
    var jml_anggota=document.Inputdata.jumlah_anggota.value;
    var no_registrasi=no_reg.substring(12,15);
    var kode_kota=no_reg.substring(3,5);
    
    var passing="savedb.php?status="+str+"&no_reg="+no_reg+"&nama_kelompok="+nama_kelompok+"&password_kk="+spassword_kk+"&spassword_kk2="+spassword_kk2;
    passing=passing+"&salamat_kk="+salamat_kk+"&sdesa_kk="+sdesa_kk+"&skecamatan_kk="+skecamatan_kk+"&semail_kk="+semail_kk+"&shp_kk="+shp_kk;
    passing=passing+"&snama1="+snama1+"&sanggota1="+sanggota1+"&snuptk1="+snuptk1;
    passing=passing+"&snama2="+snama2+"&sanggota2="+sanggota2+"&snuptk2="+snuptk2;
    passing=passing+"&snama3="+snama3+"&sanggota3="+sanggota3+"&snuptk3="+snuptk3;
    passing=passing+"&snama4="+snama4+"&sanggota4="+sanggota4+"&snuptk4="+snuptk4;
    passing=passing+"&snama5="+snama5+"&sanggota5="+sanggota5+"&snuptk5="+snuptk5;
    passing=passing+"&snama6="+snama6+"&sanggota6="+sanggota6+"&snuptk6="+snuptk6;
    passing=passing+"&snama7="+snama7+"&sanggota7="+sanggota7+"&snuptk7="+snuptk7;
    passing=passing+"&snama8="+snama8+"&sanggota8="+sanggota8+"&snuptk8="+snuptk8;
    passing=passing+"&snama9="+snama9+"&sanggota9="+sanggota9+"&snuptk9="+snuptk9;
    passing=passing+"&snama10="+snama10+"&sanggota10="+sanggota10+"&snuptk10="+snuptk10;
    passing=passing+"&snama11="+snama11+"&sanggota11="+sanggota11+"&snuptk11="+snuptk11;
    passing=passing+"&snama12="+snama12+"&sanggota12="+sanggota12+"&snuptk12="+snuptk12;
    passing=passing+"&snama13="+snama13+"&sanggota13="+sanggota13+"&snuptk13="+snuptk13;
    passing=passing+"&snama14="+snama14+"&sanggota14="+sanggota14+"&snuptk14="+snuptk14;
    passing=passing+"&snama15="+snama15+"&sanggota15="+sanggota15+"&snuptk15="+snuptk15;
    passing=passing+"&snama16="+snama16+"&sanggota16="+sanggota16+"&snuptk16="+snuptk16;
    passing=passing+"&snama17="+snama17+"&sanggota17="+sanggota17+"&snuptk17="+snuptk17;
    passing=passing+"&snama18="+snama18+"&sanggota18="+sanggota18+"&snuptk18="+snuptk18;
    passing=passing+"&snama19="+snama19+"&sanggota19="+sanggota19+"&snuptk19="+snuptk19;
    passing=passing+"&snama20="+snama20+"&sanggota20="+sanggota20+"&snuptk20="+snuptk20;
    passing=passing+"&snama21="+snama21+"&sanggota21="+sanggota21+"&snuptk21="+snuptk21;
    passing=passing+"&snama22="+snama22+"&sanggota22="+sanggota22+"&snuptk22="+snuptk22;
    passing=passing+"&snama23="+snama23+"&sanggota23="+sanggota23+"&snuptk23="+snuptk23;
    passing=passing+"&snama24="+snama24+"&sanggota24="+sanggota24+"&snuptk24="+snuptk24;
    passing=passing+"&snama25="+snama25+"&sanggota25="+sanggota25+"&snuptk25="+snuptk25+"&jml_anggota="+jml_anggota+"&no_registrasi="+no_registrasi+"&kode_kota="+kode_kota;
    xmlhttp5.open("GET",passing,true);
    xmlhttp5.send();
    //parent.location="savedb.php?status="+str+"&q=abc"+"&nama="+nama_kelompok;
    //setTimeout("alert(document.cookie)",5000);
    //alert(document.cookie);
    //setCookie("status","processing",1);
    //datanya=getCookie("status");

    /*while(datanya=="processing")
    {
        datanya=getCookie("status");
    }*/
    alert("abced");
}
function showlistanggota(str)
{
    ijumlah = parseInt(str);
    {document.Inputdata.nama1.readOnly=true;document.Inputdata.nuptk1.readOnly=true;document.Inputdata.anggota1.disabled=true;}
    {document.Inputdata.nama2.readOnly=true;document.Inputdata.nuptk2.readOnly=true;document.Inputdata.anggota2.disabled=true;}
    {document.Inputdata.nama3.readOnly=true;document.Inputdata.nuptk3.readOnly=true;document.Inputdata.anggota3.disabled=true;}
    {document.Inputdata.nama4.readOnly=true;document.Inputdata.nuptk4.readOnly=true;document.Inputdata.anggota4.disabled=true;}
    {document.Inputdata.nama5.readOnly=true;document.Inputdata.nuptk5.readOnly=true;document.Inputdata.anggota5.disabled=true;}
    {document.Inputdata.nama6.readOnly=true;document.Inputdata.nuptk6.readOnly=true;document.Inputdata.anggota6.disabled=true;}
    {document.Inputdata.nama7.readOnly=true;document.Inputdata.nuptk7.readOnly=true;document.Inputdata.anggota7.disabled=true;}
    {document.Inputdata.nama8.readOnly=true;document.Inputdata.nuptk8.readOnly=true;document.Inputdata.anggota8.disabled=true;}
    {document.Inputdata.nama9.readOnly=true;document.Inputdata.nuptk9.readOnly=true;document.Inputdata.anggota9.disabled=true;}
    {document.Inputdata.nama10.readOnly=true;document.Inputdata.nuptk10.readOnly=true;document.Inputdata.anggota10.disabled=true;}
    {document.Inputdata.nama11.readOnly=true;document.Inputdata.nuptk11.readOnly=true;document.Inputdata.anggota11.disabled=true;}
    {document.Inputdata.nama12.readOnly=true;document.Inputdata.nuptk12.readOnly=true;document.Inputdata.anggota12.disabled=true;}
    {document.Inputdata.nama13.readOnly=true;document.Inputdata.nuptk13.readOnly=true;document.Inputdata.anggota13.disabled=true;}
    {document.Inputdata.nama14.readOnly=true;document.Inputdata.nuptk14.readOnly=true;document.Inputdata.anggota14.disabled=true;}
    {document.Inputdata.nama15.readOnly=true;document.Inputdata.nuptk15.readOnly=true;document.Inputdata.anggota15.disabled=true;}
    {document.Inputdata.nama16.readOnly=true;document.Inputdata.nuptk16.readOnly=true;document.Inputdata.anggota16.disabled=true;}
    {document.Inputdata.nama17.readOnly=true;document.Inputdata.nuptk17.readOnly=true;document.Inputdata.anggota17.disabled=true;}
    {document.Inputdata.nama18.readOnly=true;document.Inputdata.nuptk18.readOnly=true;document.Inputdata.anggota18.disabled=true;}
    {document.Inputdata.nama19.readOnly=true;document.Inputdata.nuptk19.readOnly=true;document.Inputdata.anggota19.disabled=true;}
    {document.Inputdata.nama20.readOnly=true;document.Inputdata.nuptk20.readOnly=true;document.Inputdata.anggota20.disabled=true;}
    {document.Inputdata.nama21.readOnly=true;document.Inputdata.nuptk21.readOnly=true;document.Inputdata.anggota21.disabled=true;}
    {document.Inputdata.nama22.readOnly=true;document.Inputdata.nuptk22.readOnly=true;document.Inputdata.anggota22.disabled=true;}
    {document.Inputdata.nama23.readOnly=true;document.Inputdata.nuptk23.readOnly=true;document.Inputdata.anggota23.disabled=true;}
    {document.Inputdata.nama24.readOnly=true;document.Inputdata.nuptk24.readOnly=true;document.Inputdata.anggota24.disabled=true;}
    {document.Inputdata.nama25.readOnly=true;document.Inputdata.nuptk25.readOnly=true;document.Inputdata.anggota25.disabled=true;}
  if(ijumlah>=1)    
	{document.Inputdata.nama1. readOnly=false;document.Inputdata.nuptk1. readOnly=false;document.Inputdata.anggota1. disabled=false;}
    if(ijumlah>=2)          
	{document.Inputdata.nama2. readOnly=false;document.Inputdata.nuptk2. readOnly=false;document.Inputdata.anggota2. disabled=false;}
    if(ijumlah>=3)      
	{document.Inputdata.nama3. readOnly=false;document.Inputdata.nuptk3. readOnly=false;document.Inputdata.anggota3. disabled=false;}
    if(ijumlah>=4)            
	{document.Inputdata.nama4. readOnly=false;document.Inputdata.nuptk4. readOnly=false;document.Inputdata.anggota4. disabled=false;}
    if(ijumlah>=5)               
	{document.Inputdata.nama5. readOnly=false;document.Inputdata.nuptk5. readOnly=false;document.Inputdata.anggota5. disabled=false;}
    if(ijumlah>=6)                
	{document.Inputdata.nama6. readOnly=false;document.Inputdata.nuptk6. readOnly=false;document.Inputdata.anggota6. disabled=false;}
    if(ijumlah>=7)          
	{document.Inputdata.nama7. readOnly=false;document.Inputdata.nuptk7. readOnly=false;document.Inputdata.anggota7. disabled=false;}
    if(ijumlah>=8)   
	{document.Inputdata.nama8. readOnly=false;document.Inputdata.nuptk8. readOnly=false;document.Inputdata.anggota8. disabled=false;}
    if(ijumlah>=9)                  
	{document.Inputdata.nama9. readOnly=false;document.Inputdata.nuptk9. readOnly=false;document.Inputdata.anggota9. disabled=false;}
    if(ijumlah>=10)               
	{document.Inputdata.nama10.readOnly=false;document.Inputdata.nuptk10.readOnly=false;document.Inputdata.anggota10.disabled=false;}
    if(ijumlah>=11)                   
	{document.Inputdata.nama11.readOnly=false;document.Inputdata.nuptk11.readOnly=false;document.Inputdata.anggota11.disabled=false;}
    if(ijumlah>=12)               
	{document.Inputdata.nama12.readOnly=false;document.Inputdata.nuptk12.readOnly=false;document.Inputdata.anggota12.disabled=false;}
    if(ijumlah>=13)                   
	{document.Inputdata.nama13.readOnly=false;document.Inputdata.nuptk13.readOnly=false;document.Inputdata.anggota13.disabled=false;}
    if(ijumlah>=14)                
	{document.Inputdata.nama14.readOnly=false;document.Inputdata.nuptk14.readOnly=false;document.Inputdata.anggota14.disabled=false;}
    if(ijumlah>=15)                  
	{document.Inputdata.nama15.readOnly=false;document.Inputdata.nuptk15.readOnly=false;document.Inputdata.anggota15.disabled=false;}
    if(ijumlah>=16)                    
	{document.Inputdata.nama16.readOnly=false;document.Inputdata.nuptk16.readOnly=false;document.Inputdata.anggota16.disabled=false;}
    if(ijumlah>=17)                
	{document.Inputdata.nama17.readOnly=false;document.Inputdata.nuptk17.readOnly=false;document.Inputdata.anggota17.disabled=false;}
    if(ijumlah>=18)                    
	{document.Inputdata.nama18.readOnly=false;document.Inputdata.nuptk18.readOnly=false;document.Inputdata.anggota18.disabled=false;}
    if(ijumlah>=19)              
	{document.Inputdata.nama19.readOnly=false;document.Inputdata.nuptk19.readOnly=false;document.Inputdata.anggota19.disabled=false;}
    if(ijumlah>=20)                  
	{document.Inputdata.nama20.readOnly=false;document.Inputdata.nuptk20.readOnly=false;document.Inputdata.anggota20.disabled=false;}
    if(ijumlah>=21)                 
	{document.Inputdata.nama21.readOnly=false;document.Inputdata.nuptk21.readOnly=false;document.Inputdata.anggota21.disabled=false;}
    if(ijumlah>=22)                   
	{document.Inputdata.nama22.readOnly=false;document.Inputdata.nuptk22.readOnly=false;document.Inputdata.anggota22.disabled=false;}
    if(ijumlah>=23)                  
	{document.Inputdata.nama23.readOnly=false;document.Inputdata.nuptk23.readOnly=false;document.Inputdata.anggota23.disabled=false;}
    if(ijumlah>=24) 
	{document.Inputdata.nama24.readOnly=false;document.Inputdata.nuptk24.readOnly=false;document.Inputdata.anggota24.disabled=false;}
    if(ijumlah>=25) 
	{document.Inputdata.nama25.readOnly=false;document.Inputdata.nuptk25.readOnly=false;document.Inputdata.anggota25.disabled=false;}
    
    //window.alert(str);
   //ChangeNoReg_updatelist("XX")

}
function update_retprop(str)
{
    var data,data1;
    data=document.Inputdata.no_registrasi.value;
    data = data.substring(2,15);
    document.Inputdata.no_registrasi.value = str + data;
}
function update_noreg(str)
{
    var data,data1;
    data=document.Inputdata.no_registrasi.value;
    data1=document.Inputdata.no_registrasi.value;
    data = data.substring(0,3);
    data1 = data1.substring(5,15);
    document.Inputdata.no_registrasi.value = data + str + data1;
}
function update_kk_reg(str)
{
    var data,data1;
    data=document.Inputdata.no_registrasi.value;
    data1=document.Inputdata.no_registrasi.value;
    data = data.substring(0,6);
    data1 = data1.substring(7,15);
    document.Inputdata.no_registrasi.value = data + str + data1;
}
function update_bidang(str)
{
    //XX-XX-X-XXX-001	
    var data,data1;
    data=document.Inputdata.no_registrasi.value;
    data1=document.Inputdata.no_registrasi.value;
    data = data.substring(0,8);
    data1 = data1.substring(11,15);
    document.Inputdata.no_registrasi.value = data + str + data1;
}
function update_no_urut()
{
    var data,data1;
    data=document.cookie;
    len=data.length;
    i=0;
    while(data1!="VaniaCantik" && i<len)
    {
	data1=data.substring(i,i+11);
	i=i+1;
        //alert(data1);
    }
    //alert(data1);
    str=data.substring(i+11,i+14);
    //alert(str);
    //alert(str);
    iurut=parseInt(str);
    iurut=iurut+1;
    if(i==len)
        iurut=1;
    if(iurut<10)
        str='00'+iurut;
    else if (iurut<100)
        str='0'+iurut;
    else
        str = iurut;
    data=document.Inputdata.no_registrasi.value;
    data1=document.Inputdata.no_registrasi.value;
    data = data.substring(0,12);
    document.Inputdata.no_registrasi.value = data + str;
}
function kosongi_noreg()
{
    //XX-XX-X-XXX-001	
    var data,data1;
    //alert("fdsafsa");
    data1=document.Inputdata.no_registrasi.value;
    //alert(data1);
    data = 'XX-XX-X-XXX-XXX';
    data1 = data1.substring(12,15);
    document.Inputdata.no_registrasi.value = data;// + data1;
    
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<title>PROFIL KKG/MGMP, KKKS/MKKS, KKPS/MKPS</title>
    
<link rel="stylesheet" type="text/css" href="css/style-min.css" />
<link rel="stylesheet" type="text/css" href="css/table-min.css" />
<link rel="stylesheet" type="text/css" href="css/menu-min.css" />

<script type="text/javascript" src="script/libs_c.js"></script>
<!--<script type="text/javascript" src="script/default.js"></script>-->



<script type="text/javascript" language="javascript" src="script/script.js"></script>


<!--[if IE]>
<style type="text/css">
/* 50 = ti_m padding + margin */
#t_o { width: expression((document.getElementById('ti_m').offsetWidth + 50) > document.documentElement.offsetWidth ? document.documentElement.scrollWidth : ''); }
#ti_m1 { border-left: 0; }
#t_m .linfo, #t_m .rinfo { line-height: 1.6em; }
.toolbar fieldset { padding-bottom: 2px; }
input.button { padding: 0 8px; }
h3 { background-position: 0 1px; }
/* To prevent extra spacing under the tab */
div.tab { float: none; }
</style>
<![endif]-->

<!--[if lte IE 6]>
<script type="text/javascript" language="javascript" src="script/cssmenu.js"></script>
<style type="text/css">
img {
	behavior: url("imanges/pngbehavior.htc"); /* Must be absolute path */
}
</style>
<![endif]-->



<!-- module IE css -->

<style>
im { cursor:pointer;}
</style>

<link rel="shortcut icon" href="images/diknas-ico.png" />

</head>

<body>
	<div id="t_o">
			
		<im><div id="t_h" OnClick="window.location=('http://psdmp.kemdiknas.go.id')">
			<div class="w0">
				<div class="w1">
					<div id="logo"><img alt="makara" src="images/diknas.png" style="width:42px;height:42px"/></div>
					<h1><em>KEMENTERIAN PENDIDIKAN DAN KEBUDAYAAN</em></h1>
					<!--<h2><br>FORMAT INSTRUMEN PROFIL KKG/MGMP, KKKS/MKKS, KKPS/MKPS</br></h2>
					<h2> <em>Kementerian Pendidikan dan Kebudayaan</em> </h2>-->

					<!--<div class="lang icons">
						Language: &nbsp;
																					<span class="currentlang" title="Current language"><img src="images/id.png" /></span>
																					<a href="../System/Language?lang=en"><img src="images/en.png" /></a>
														 |
						zoom <select onchange="zoom(this)"><option value="100">100%</option><option value="110">110%</option><option value="120">120%</option><option value="140">140%</option><option value="150">150%</option></select>

					</div>-->
				</div>
			</div>
		</div></im>

		<div id="t_m">
			<div class="w0">
				<div class="w1">
					<ul id="nv">
					    <li class="static"><a href="#">&gt;&gt;</a></li>
					    <li><a href="lihat_data.php">Home</a></li>
					    <li class="class hc"><a href="#">Atur Data</a>
					        <ul>
					            <li class="last"><a href="lihat_data.php">Isi / Edit Data Kelompok Kerja</a></li>
					            <li class="last"><a href="view.php?reg=<?php echo $reg_no ?>">Lihat Data Kelompok Kerja</a></li>
					            <?php echo $additional_menu?>
					        </ul></li><li class="class hc"><a href="#">Laporan</a>
					        <ul>
					            <li><a href="ptampil_data.php">Rekapitulasi Data Kelompok Kerja</a></li>
					            <li class="last"><a href="showlistdata.php">Daftar Kelompok Kerja</a></li>
					        </ul></li><li class="class hc"></li></ul>
					     </li>
					 </ul>

					<div style="border-top:2px solid gold;border-bottom:1px solid #C90"><!-- --></div>
					<div id="m_b">
						<div id="m_b1">
							<div class="linfo" style="border-left:0">
								 <br/>
								<strong>
																<a href="/main/Authentication/Status" title="Detail"><img style="vertical-align:bottom" src="images/role2.png" class="png16" alt="person"/></a> User Login
																&ndash; <a href="#" title="Ganti Role"></a> <?php echo $nama_kk?> </strong>

							</div>
							<div class="linfo" style="border-right:0">
								 <a href="logout.php"><img src="<?php echo $img_log?>" /></a>
							</div>
							<div class="rinfo" style="font:1.4em calibri;letter-spacing:-1px">
								<!--Logout Counter <span id="ss_min">30</span>:<span id="ss_sec">00</span>--> </a><strong>Jumlah Kelompok Kerja Terdaftar : <?php echo $jumlah_total_kk ?></strong>
							</div>

							
							<div class="clear"><!-- --></div>

							<div style="border-bottom:1px solid #DDD"><!-- --></div>
							<h2 id="ti_h">Rekapitulasi Data Instrumen Profil KKG/MGMP, KKKS/MKKS, KKPS/MKPS <?php echo $Rekapitulasi ?></h2>
							<div id="ti_m">
								<div id="ti_m1">

							<div class="clear"></div>



<div class="clear">&nbsp;</div>

<form action="kirimpos.php" method="post" name="Inputdata">
	<input type="hidden" name="KD_MHS" value="" />
	<table class="box" width="100%">
        <th colspan="4">Rekapitulasi Data <?php echo $Rekapitulasi ?> KKG/MGMP, KKKS/MKKS, KKPS/MKPS</th>
 	</table>
	<table class="box" width="100%">
         <p id="rekapnas"></p>
	</table>
</form>
																	</div>
							</div>
						</div>
					</div>

					<div style="clear:both;border-bottom:1px solid #DDD"><!-- --></div>
					<div class="foot">
						<div style="float:left">&copy; Copyright 20011 <a href="http://psdmp.kemdiknas.go.id" target="_blank">Kementerian Pendidikan dan Kebudayaan</a></div>

						<div style="float:right">Sekretariat PSDMP dan PMP</div>
						<div class="clear"></div>
					</div>

				</div>
			</div>
		</div>
		<div id="t_f"><div><div>&nbsp;</div></div></div>
	</div>
	<script type="text/javascript" > showrekapnasional('<?php echo $sprop2 ?>'); </script>    

</body>
</html>
